package com.insurance.enums;

/**
 * 订单状态枚举类
 */
public enum OrderStateEnum {

	NO_PAY("0", "未支付"),
	IS_PAY("1", "已支付"),
	CANCEL("-1", "已取消"),
	COMPLETE("6", "已完成");

    private String code;

    private String message;

	OrderStateEnum(String code, String message){
        this.code = code;
        this.message = message;
    }

	public String getCode() {
		return code;
	}

	public String getMessage() {
		return message;
	}

	public static String getMsg(String code){
		OrderStateEnum[] values = values();
		for (OrderStateEnum orderStateEnum : values){
			if(code.equals(orderStateEnum.getCode())){
				return orderStateEnum.getMessage();
			}
		}
		return "";
	}

}
